<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
    <style>
        img{
            width: 500px;
            height: 300px;
        }
    </style>
</head>
<body>
    <div id="app">
        <button @click="backPage">上一页</button>
        <img :src="showImg"/>
        <button @click="nextPage">下一页</button>
    </div>
</body>
</html>
<script>
    new Vue({
        el: 'div',
        data: {
            msg: 'hello vue',
            showImg:'https://media.9game.cn/gamebase/ieu-gdc-pre-process/images/20240227/4/20/1ab4b9be4d70ceedaf5703d20ca6a31c.jpg'
        },
        methods: {
            nextPage(){
                this.showImg = 'https://upload-bbs.miyoushe.com/upload/2024/01/28/284637836/bf9c4b509d615b3f6bbec72c3e179dc5_7975529891913249117.png'
            },
            backPage(){
                this.showImg = 'https://media.9game.cn/gamebase/ieu-gdc-pre-process/images/20240227/4/20/1ab4b9be4d70ceedaf5703d20ca6a31c.jpg'
            }
        },
    })
</script>